﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using log4net;
using System.Web.Security;
using KhoiKhoa.Web.Helper;

namespace KhoiKhoa.Web.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        private static ILog _logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        public ActionResult Index(string page)
        {
            //ViewData["Message"] = FormsAuthentication.HashPasswordForStoringInConfigFile("khoikhoa1234", "MD5");
            _logger.Debug("Page : " + page);

            if (page == string.Empty)
                return View("BangBaoGia");

            return View(((Dictionary<string, string>)HttpContext.Application["QueryStringToViewName"])[page]);
        }
    }
}
